===============================================
CARA MEMPERBAIKI MENU AGENT LOADING
===============================================

LANGKAH CEPAT (5 MENIT):
========================

1. RESTART SERVER
   ✓ Buka XAMPP Control Panel
   ✓ Klik "Stop" pada Apache
   ✓ Klik "Stop" pada MySQL
   ✓ Tunggu 5 detik
   ✓ Klik "Start" pada Apache
   ✓ Klik "Start" pada MySQL

2. CLEAR BROWSER CACHE
   ✓ Tekan Ctrl + Shift + Del
   ✓ Centang "Cached images and files"
   ✓ Klik "Clear data"
   ✓ Tutup browser
   ✓ Buka browser lagi

3. TEST DATABASE
   ✓ Buka browser
   ✓ Akses: http://localhost/mikhmon/test_agent_db.php
   ✓ Harus muncul tanda centang hijau semua
   ✓ Jika ada error merah, lanjut ke langkah 4

4. INSTALL DATABASE (jika belum)
   ✓ Akses: http://localhost/mikhmon/install_agent_system.php
   ✓ Isi form database:
     - Host: localhost
     - Username: root
     - Password: (kosongkan jika default)
     - Database: mikhmon_agents
   ✓ Klik "Install Agent System"
   ✓ Tunggu sampai selesai

5. LOGIN & TEST
   ✓ Login ke MikhMon admin
   ✓ Klik menu "Agent Management"
   ✓ Klik "Daftar Agent"
   ✓ Halaman harus muncul (meski kosong)

JIKA MASIH LOADING:
===================

Cek Error Message:
------------------
✓ Sekarang menu agent sudah ada error handling
✓ Jika ada error, akan muncul pesan merah
✓ Screenshot pesan error tersebut
✓ Kirim ke developer

Enable Error Display:
---------------------
✓ Buka file: mikhmon/index.php
✓ Cari baris 18: error_reporting(0);
✓ Ubah jadi:
  error_reporting(E_ALL);
  ini_set('display_errors', 1);
✓ Save file
✓ Refresh browser
✓ Error akan muncul di halaman

Cek Browser Console:
--------------------
✓ Tekan F12 di browser
✓ Klik tab "Console"
✓ Refresh halaman
✓ Lihat ada error merah?
✓ Screenshot error tersebut

Cek Apache Error Log:
---------------------
✓ Buka folder: xampp/apache/logs/
✓ Buka file: error.log
✓ Scroll ke bawah (error terbaru)
✓ Cari error terkait mikhmon/agent
✓ Copy error tersebut

MASALAH UMUM & SOLUSI:
======================

1. "Database connection failed"
   → Cek MySQL running
   → Cek username/password di db_config.php
   → Cek database mikhmon_agents sudah dibuat

2. "Table not found"
   → Install database via install_agent_system.php
   → Atau import manual agent_system.sql

3. "Class Agent not found"
   → Cek file lib/Agent.class.php ada
   → Cek file permissions (755)

4. "Headers already sent"
   → Cek tidak ada spasi sebelum <?php
   → Save file dengan UTF-8 without BOM

5. Halaman blank putih
   → Enable error display (lihat di atas)
   → Cek Apache error log

6. Loading terus tanpa error
   → Clear browser cache
   → Coba browser lain
   → Disable browser extensions
   → Coba mode incognito

KONTAK SUPPORT:
===============

Jika sudah coba semua cara di atas tapi masih error:

Kirim informasi berikut:
1. Screenshot error message (jika ada)
2. Screenshot browser console (F12)
3. Screenshot hasil test_agent_db.php
4. Copy isi Apache error.log (bagian error)
5. Versi PHP (cek di phpinfo)
6. Versi MySQL (cek di phpMyAdmin)

===============================================
File ini dibuat: <?= date('Y-m-d H:i:s'); ?>

===============================================
